<template>
  <div>
    <el-container style="min-height: 100vh;">
      <el-header>
        <CenterHead :user="user"></CenterHead>
      </el-header>
      <el-container>
        <el-aside>
          <CenterSide></CenterSide>
        </el-aside>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
// @ is an alias to /src
import CenterHead from "@/components/Center/CenterHead";
import CenterSide from "@/components/Center/CenterSide";
export default {
  name: 'CenterManage',
  components: {
    CenterHead,
    CenterSide,
  },
  data(){
    return{
      user: {}
    }
  },
  methods:{
    getUser: function () {
      // this.user = JSON.parse(localStorage.getItem("user"))
      this.user = {
        id: 1635088985338245122,
        userName: "admin",
        avatar: "https://p.qqan.com/up/2021-6/16246735796128385.png",
        nickName: "测试账号",
        sex: 0
      }
    }
  },
  mounted() {
    this.getUser()
    this.nickName = localStorage.getItem("nickName")
  }
}
</script>
